<?php
/**
数据类型转换
 */

$a = "xx10";
$b = (int)$a;

$a = false;
$b = (int)$a;

$a = [0];//注意有值，无值
$b = (int)$a;

$a = [];
$b = (float)$a;


$a = [0];
$b = (bool)$a;

//false "0",""
//true 其它字符
$a = "false";
$b = (bool)$a;


// false 0,-0
// true 其它数字
$a = 23;
$b = (bool)$a;


// false 0.0 -0.00
// true 其它浮点数

$a = -0.000;
$b = (bool)$a;



// true -. '1'  false -->''

// 1.0000 ==> '1'


$a = -1.0;
$b = (string)$a;


$a = false;
$b = (array)$a;


$a = "aaa";
$b = (object)$a;








var_dump($b);